GtkLabel: Fix a pointless expression
authorMatthias Clasen <mclasen@redhat.com>
Fri, 30 Nov 2012 03:02:16 +0000 (22:02 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 30 Nov 2012 04:10:34 +0000 (23:10 -0500)
Clearly, what was meant here was that we create a new attribute
list if either of the input attribute lists are non-NULL.
This was found by Coverity.

gtk/gtklabel.c

index 92f55b6c14402f1050e816bc96252a4d393e4fba..5f0591dfa384c60f7f5f83745e70afb5751e04ef 100644 (file)
@@ -3384,7 +3384,7 @@ gtk_label_ensure_layout (GtkLabel *label)
               pango_attr_list_insert (attrs, attribute);
             }
         }
-      else if (priv->markup_attrs && priv->markup_attrs)
+      else if (priv->markup_attrs || priv->attrs)
         attrs = pango_attr_list_new ();
       else
         attrs = NULL;